package otheri.download;

import android.content.Context;
import android.view.KeyEvent;
import android.webkit.WebView;

public class MainWebView extends WebView {

	public MainWebView(Context context) {
		super(context);

		requestFocus();
		setScrollbarFadingEnabled(true);
		getSettings().setJavaScriptEnabled(true);
		getSettings().setSupportZoom(false);

		// this.setBackgroundColor(0xFF000000);
	}

	public boolean back() {
		if (canGoBack()) {
			goBack();
			return true;
		}
		return false;
	}

	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			return back();
		}
		return false;
	}

}
